package net.wofly.sale.commodity.util;

public enum CommodityTerminalType {
	会员(1, "会员"),
	流通(2, "流通"),
	酒店暗标款(3, "酒店暗标款"),
	酒店(4, "酒店");

	private int value;
	private String name;

	CommodityTerminalType(int value, String name) {
		this.value = value;
		this.name = name;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public static String getName(int val) {  
        for (CommodityTerminalType c : CommodityTerminalType.values()) {  
            if (c.getValue() == val) {  
                return c.name;  
            }  
        }  
        return null;  
    }  
}
